package com.ndp.fb.walle.business.impl;

import com.alibaba.dubbo.config.annotation.Reference;
import com.ndp.fb.rdb.api.OrganizationRdbService;
import com.ndp.fb.rdb.model.Organization;
import com.ndp.fb.walle.business.OrganizationService;
import org.springframework.stereotype.Component;

/**
 * Created by hermen.he on 2016/2/26.
 */
@Component
public class OrganizationServiceImpl implements OrganizationService {

    @Reference
    private OrganizationRdbService organizationRdbService;

    @Override
    public Long save(Organization organization) {
        return organizationRdbService.save(organization);
    }

    @Override
    public Organization findById(Long id) {
        return organizationRdbService.findById(id);
    }


    @Override
    public void modify(Organization organization) {
        organization.setStatus(1);
        organizationRdbService.modify(organization);
    }

}
